<template>
  <div>
    <el-row type="flex" justify="center">
      <el-col :span="12">
        <el-input placeholder="百度一下,你就知道" v-model="inputValue" @keyup.enter.native="search">
          <el-button slot="append" icon="el-icon-search" @click="search"></el-button>
        </el-input>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      inputValue: ''
    }
  },
  methods: {
    search() {
      open('https://www.baidu.com/s?ie=UTF-8&wd=' + this.inputValue)
      this.inputValue = ''
    }
  }
}
</script>

<style lang="less" scoped></style>
